<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var day = prompt('请输入本月日期1~31：');
        var num = day % 7;
        switch (num) {
            case 0:
                {
                    alert('今天星期二');
                    break;
                }
            case 1:
                {
                    alert('今天星期三');
                    break;
                }
            case 2:
                {
                    alert('今天星期四');
                    break;
                }
            case 3:
                {
                    alert('今天星期五');
                    break;
                }
            case 4:
                {
                    alert('今天星期六');
                    break;
                }
            case 5:
                {
                    alert('今天星期日');
                    break;
                }
            default:
                {
                    alert('今天星期一');
                }
        }
    </script>
</head>

<body>

</body>

</html>